finding zeros of rational functions